#!/bin/sh

set -e

WEBDIS_HOST="${WEBDIS_HOST:-127.0.0.1}"
WEBDIS_PORT="${WEBDIS_PORT:-7379}"

COMMAND="$(echo "$*" | replace ' ' '/' | urlencode)"

#set -x

exec curl -fsSL "http://${WEBDIS_HOST}:${WEBDIS_PORT}/${COMMAND}"
